package com.csk.zsk.compents.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csk.zsk.compents.dao.PicnewsDao;
import com.csk.zsk.compents.entity.Picnews;
import com.csk.zsk.compents.service.PicnewsService;

@Service
@Transactional
public class PicnewsServiceImpl implements PicnewsService {
	@Autowired
	private PicnewsDao picnewsDao;
	@Override
	public Picnews getPicnews(String id) {
		return picnewsDao.getIdByGetMethod(id);
	}

	@Override
	public Picnews getTop1() {
		return picnewsDao.getTop1();
	}

	@Override
	public List<Picnews> getPicnewsByTime(int length) {
		return picnewsDao.getPicnewsByTime(length);
	}

	@Override
	public List<Picnews> getPicnewsByTypeTime(String type, int length) {
		return picnewsDao.getPicnewsByTypeTime(type, length);
	}

}
